﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormsApp1
{
    class Cli
    {
        private readonly Form _frm;

        public Cli(Form frm) => _frm = frm;

        [Description("修改主窗口标题")]
        public void Title(string str) => _frm.Invoke(new Action(() => _frm.Text = str));

        [Description("打印日志到控制台")]
        public void Log(string message) => Console.WriteLine(message ?? "<@null>");

    }
}
